<?php 
$data = $this->data;
?>
<h1>Manage the main categories</h1>
	<form name="frmCatAdm" method="post" enctype="multipart/form-data">
    	<div style="float:left;">Keyword: <input type="text" name="keyword" value="<?php echo 'key word'; ?>" />&nbsp;<input type="button" value="Search" onclick="onSearch();" /></div>
	`	<div class="add-del" style="float:right;">
			<input type="button" value="ADD" onclick="onAdd('/admin/category/add');" />&nbsp;&nbsp;
			<input type="button" value="DELETE" name="delAll" onclick="onDelAll('/admin/category/delete/id/');" />
		</div>
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<th>Nbrs</th>
				<th>Category name</th>
				<th>Description</th>
				<th>Image</th>
				<th colspan="2">Action</th>
				<th><input type="checkbox" name="chkMasCheck" value="" onclick="onCheckAll();" /></th>
			</tr>
			<?php $i=1; foreach($data as $item): ?>
			<tr>
				<td align="center"><?php echo $i; ?></td>
				<td><?php echo $item['cat_name']; ?></td>
				<td><?php echo $item['cat_des']; ?></td>
				<td align="center"><a class="fancybox" href="<?php echo $this->baseUrl(); ?>/app/templates/admin/images/upload/category/<?php echo $item['cat_img']; ?>"><img src="<?php echo $this->baseUrl(); ?>/app/templates/admin/images/upload/category/<?php echo $item['cat_img']; ?>" alt="<?php echo $item['cat_img']; ?>" width="50" height="50" style="border:1px solid #c0c0c0; padding:3px;"/></a></td> 
				<td align="center"><a href="<?php echo $this->baseUrl(); ?>/admin/category/edit/id/<?php echo $item['cat_id']; ?>"><img class="change" src="<?php echo $this->baseUrl(); ?>/app/templates/admin/images/edit.png" title="edit" alt="edit" /></a></td>
				<td align="center"><a href="javascript:void(0);" onclick="onDel('/admin/category/delete/id/<?php echo $item['cat_id']; ?>');"><img class="change" src="<?php echo $this->baseUrl(); ?>/app/templates/admin/images/del.png" alt="delete" title="delete" /></a></td>
				<td align="center"><input type="checkbox" name="chk" value="<?php echo $item['cat_id']; ?>" /></td>
			</tr>
			<?php $i++; endforeach; ?>
		</table>
		<div class="paging"><?php echo 'paging'; ?></div>
	</form>